import React from "react";
import {
  HashRouter,
  Switch,
  Route,
  Link
} from "react-router-dom";
import Team from "./Team";
import Timi from "./Timi";
import Tencent from "./Tencent";

class About extends React.Component{
  render(){
    return(
      <HashRouter>
        <div>
          <div>我是子页面的标题</div>
          <ul>
            <li>
              <Link to="/about">团队</Link>
            </li>
            <li>
              <Link to="/about/timi">timi</Link>
            </li>
            <li>
              <Link to="/about/tencent">腾讯</Link>
            </li>
          </ul>
          <div>
            <Switch>
              <Route path="/about" component={Team}/>
              <Route path="/about/timi" component={Timi}/>
              <Route path="/about/tencent" component={Tencent}/>
            </Switch>
          </div>
        </div>
      </HashRouter>
    )
  }
  componentDidMount(){
    // console.log(this.props.match.params.username)
    // console.log(this.props.location.state.username)
  }
}

export default About;